package com.lizheng.yunservice.travel.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lizheng.yunservice.common.domain.PageQuery;
import com.lizheng.yunservice.common.page.TableDataInfo;
import com.lizheng.yunservice.travel.doamin.CulturalWork;
import com.lizheng.yunservice.travel.doamin.vo.CulturalWorkVo;
import com.lizheng.yunservice.travel.mapper.CulturalWorkMapper;
import com.lizheng.yunservice.travel.service.ICulturalWorkService;
import org.springframework.stereotype.Service;

@Service
public class CulturalWorkServiceImpl extends ServiceImpl<CulturalWorkMapper, CulturalWork> implements ICulturalWorkService {

    @Override
    public TableDataInfo<CulturalWorkVo> getCulturalWorkList(Long scenicId, PageQuery pageQuery) {
        Page<CulturalWorkVo> page = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize());
        baseMapper.selectCulturalWorkImagePage(page, scenicId);
        return TableDataInfo.build(page);
    }
}